home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news text
| default
| |
99%
| file
| C source text
| default
| |
98%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 67 75 | 69 6c 6c 6f 74 69 6e 65 |Path: gu|illotine|
|00000010| 2e 6d 74 6c 2e 64 6d 72 | 2e 63 61 21 6e 65 77 73 |.mtl.dmr|.ca!news|
|00000020| 0a 46 72 6f 6d 3a 20 46 | 72 61 6e 63 6f 69 73 20 |.From: F|rancois |
|00000030| 44 6f 6e 61 74 6f 20 3c | 64 6f 6e 61 74 6f 66 72 |Donato <|donatofr|
|00000040| 40 6d 74 6c 2e 64 6d 72 | 2e 63 61 3e 0a 4e 65 77 |@mtl.dmr|.ca>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 6c 61 |sgroups:| comp.la|
|00000060| 6e 67 2e 63 2b 2b 0a 53 | 75 62 6a 65 63 74 3a 20 |ng.c++.S|ubject: |
|00000070| 52 65 3a 20 4d 6f 72 65 | 20 43 6c 61 73 73 0a 44 |Re: More| Class.D|
|00000080| 61 74 65 3a 20 4d 6f 6e | 2c 20 30 34 20 4d 61 72 |ate: Mon|, 04 Mar|
|00000090| 20 31 39 39 36 20 32 33 | 3a 30 35 3a 33 39 20 2d | 1996 23|:05:39 -|
|000000a0| 30 35 30 30 0a 4f 72 67 | 61 6e 69 7a 61 74 69 6f |0500.Org|anizatio|
|000000b0| 6e 3a 20 47 72 6f 75 70 | 65 20 44 4d 52 20 49 6e |n: Group|e DMR In|
|000000c0| 63 2e 2c 20 4d 6f 6e 74 | 72 65 61 6c 2c 20 51 63 |c., Mont|real, Qc|
|000000d0| 2c 20 43 61 6e 61 64 61 | 0a 4d 65 73 73 61 67 65 |, Canada|.Message|
|000000e0| 2d 49 44 3a 20 3c 33 31 | 33 42 42 44 39 33 2e 34 |-ID: <31|3BBD93.4|
|000000f0| 42 46 44 40 6d 74 6c 2e | 64 6d 72 2e 63 61 3e 0a |BFD@mtl.|dmr.ca>.|
|00000100| 52 65 66 65 72 65 6e 63 | 65 73 3a 20 3c 34 68 65 |Referenc|es: <4he|
|00000110| 30 36 63 24 71 68 70 40 | 6e 6f 76 61 2e 75 6d 75 |06c$qhp@|nova.umu|
|00000120| 63 2e 65 64 75 3e 0a 4e | 4e 54 50 2d 50 6f 73 74 |c.edu>.N|NTP-Post|
|00000130| 69 6e 67 2d 48 6f 73 74 | 3a 20 73 6c 69 70 32 37 |ing-Host|: slip27|
|00000140| 2e 6d 74 6c 2e 64 6d 72 | 2e 63 61 0a 4d 69 6d 65 |.mtl.dmr|.ca.Mime|
|00000150| 2d 56 65 72 73 69 6f 6e | 3a 20 31 2e 30 0a 43 6f |-Version|: 1.0.Co|
|00000160| 6e 74 65 6e 74 2d 54 79 | 70 65 3a 20 74 65 78 74 |ntent-Ty|pe: text|
|00000170| 2f 70 6c 61 69 6e 3b 20 | 63 68 61 72 73 65 74 3d |/plain; |charset=|
|00000180| 75 73 2d 61 73 63 69 69 | 0a 43 6f 6e 74 65 6e 74 |us-ascii|.Content|
|00000190| 2d 54 72 61 6e 73 66 65 | 72 2d 45 6e 63 6f 64 69 |-Transfe|r-Encodi|
|000001a0| 6e 67 3a 20 37 62 69 74 | 0a 58 2d 4d 61 69 6c 65 |ng: 7bit|.X-Maile|
|000001b0| 72 3a 20 4d 6f 7a 69 6c | 6c 61 20 32 2e 30 20 28 |r: Mozil|la 2.0 (|
|000001c0| 57 69 6e 39 35 3b 20 49 | 29 0a 54 6f 3a 20 73 72 |Win95; I|).To: sr|
|000001d0| 75 73 73 65 6c 6c 40 6e | 6f 76 61 2e 75 6d 75 63 |ussell@n|ova.umuc|
|000001e0| 2e 65 64 75 0a 43 43 3a | 20 73 72 75 73 73 65 6c |.edu.CC:| srussel|
|000001f0| 6c 40 6e 6f 76 61 2e 75 | 6d 75 63 2e 65 64 75 0a |l@nova.u|muc.edu.|
|00000200| 0a 48 69 20 53 74 65 76 | 65 0a 09 49 20 72 65 61 |.Hi Stev|e..I rea|
|00000210| 64 20 79 6f 75 72 20 6d | 65 73 73 61 67 65 20 61 |d your m|essage a|
|00000220| 6e 64 20 49 20 73 65 6e | 64 20 79 6f 75 20 64 69 |nd I sen|d you di|
|00000230| 72 65 63 74 6c 79 20 73 | 6f 6d 65 20 68 69 6e 74 |rectly s|ome hint|
|00000240| 2e 20 0a 09 49 20 74 68 | 69 6e 67 20 49 20 63 61 |. ..I th|ing I ca|
|00000250| 6e 20 68 65 6c 70 20 79 | 6f 75 2c 20 49 27 6d 20 |n help y|ou, I'm |
|00000260| 61 20 70 72 6f 66 65 73 | 73 69 6f 6e 61 6c 20 73 |a profes|sional s|
|00000270| 6f 66 74 77 61 72 65 20 | 64 65 73 69 67 6e 65 72 |oftware |designer|
|00000280| 0a 09 74 68 61 74 20 77 | 6f 72 6b 20 69 6e 20 43 |..that w|ork in C|
|00000290| 20 73 69 6e 63 65 20 6d | 6f 72 65 20 74 68 61 6e | since m|ore than|
|000002a0| 20 31 30 20 79 65 61 72 | 73 20 61 6e 64 20 69 6e | 10 year|s and in|
|000002b0| 20 43 2b 2b 20 73 69 6e | 63 65 20 6d 6f 72 65 0a | C++ sin|ce more.|
|000002c0| 09 74 68 61 6e 20 35 20 | 79 65 61 72 73 2e 20 49 |.than 5 |years. I|
|000002d0| 20 77 6f 72 6b 20 6f 6e | 6c 79 20 77 69 74 68 20 | work on|ly with |
|000002e0| 74 68 65 73 65 20 74 77 | 6f 20 6c 61 6e 67 75 61 |these tw|o langua|
|000002f0| 67 65 73 2e 20 0a 3e 20 | 0a 3e 20 20 20 20 20 20 |ges. .> |.> |
|00000300| 20 20 20 49 27 6d 20 64 | 6f 69 6e 67 20 6d 79 20 | I'm d|oing my |
|00000310| 66 69 72 73 74 20 63 2b | 2b 20 70 72 6f 67 72 61 |first c+|+ progra|
|00000320| 6d 20 6f 6e 20 75 6e 69 | 78 2c 20 6d 79 20 66 69 |m on uni|x, my fi|
|00000330| 72 73 74 20 63 2b 2b 20 | 70 72 6f 67 72 61 6d 73 |rst c++ |programs|
|00000340| 0a 3e 20 20 20 20 20 20 | 20 20 20 77 69 74 68 20 |.> | with |
|00000350| 63 6c 61 73 73 65 73 2c | 20 61 6e 64 20 6d 79 20 |classes,| and my |
|00000360| 66 69 72 73 74 20 63 2b | 2b 20 70 72 6f 67 72 61 |first c+|+ progra|
|00000370| 6d 20 6c 69 6e 6b 69 6e | 67 20 61 6c 6c 20 74 68 |m linkin|g all th|
|00000380| 65 20 73 65 70 65 72 61 | 74 65 0a 3e 20 20 20 20 |e sepera|te.> |
|00000390| 20 20 20 20 20 63 6f 6d | 70 6f 6e 65 6e 74 73 20 | com|ponents |
|000003a0| 28 20 6d 61 69 6e 20 70 | 72 6f 67 72 61 6d 2c 20 |( main p|rogram, |
|000003b0| 63 6c 61 73 73 20 68 65 | 61 64 65 72 2c 20 6d 65 |class he|ader, me|
|000003c0| 6d 62 65 72 20 66 75 6e | 63 74 69 6f 6e 20 66 69 |mber fun|ction fi|
|000003d0| 6c 65 29 0a 3e 20 20 20 | 20 20 20 20 20 20 74 6f |le).> | to|
|000003e0| 67 65 74 68 65 72 2e 0a | 3e 20 0a 3e 20 20 20 20 |gether..|> .> |
|000003f0| 20 20 20 20 20 49 20 77 | 6f 75 6c 64 20 6c 69 6b | I w|ould lik|
|00000400| 65 20 74 6f 20 61 73 6b | 20 73 6f 6d 65 20 70 72 |e to ask| some pr|
|00000410| 65 76 65 6e 74 61 74 69 | 76 65 20 71 75 65 73 74 |eventati|ve quest|
|00000420| 69 6f 6e 73 20 62 65 66 | 6f 72 65 20 49 20 63 6f |ions bef|ore I co|
|00000430| 6d 70 69 6c 65 0a 3e 20 | 20 20 20 20 20 20 20 20 |mpile.> | |
|00000440| 61 73 20 49 20 64 69 64 | 20 20 6d 6f 73 74 20 6f |as I did| most o|
|00000450| 66 20 74 68 69 73 20 77 | 69 74 68 6f 75 74 20 74 |f this w|ithout t|
|00000460| 65 78 74 20 73 75 70 70 | 6f 72 74 3a 0a 3e 20 0a |ext supp|ort:.> .|
|00000470| 3e 20 20 20 20 20 20 20 | 20 20 54 68 65 20 66 69 |> | The fi|
|00000480| 72 73 74 20 69 73 20 69 | 66 20 79 6f 75 20 75 73 |rst is i|f you us|
|00000490| 65 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 22 |e the fu|nction "|
|000004a0| 73 74 72 63 6d 70 22 20 | 64 6f 20 79 6f 75 20 68 |strcmp" |do you h|
|000004b0| 61 76 65 20 74 6f 0a 3e | 20 20 20 20 20 20 20 20 |ave to.>| |
|000004c0| 20 61 63 74 75 61 6c 6c | 79 20 72 65 6e 61 6d 65 | actuall|y rename|
|000004d0| 20 79 6f 75 72 20 73 74 | 72 69 6e 67 73 20 27 73 | your st|rings 's|
|000004e0| 31 27 20 61 6e 64 20 27 | 73 32 27 20 61 6e 64 20 |1' and '|s2' and |
|000004f0| 63 61 6e 20 79 6f 75 20 | 70 75 74 0a 3e 20 20 20 |can you |put.> |
|00000500| 20 20 20 20 20 20 6a 75 | 73 74 20 61 6e 79 20 74 | ju|st any t|
|00000510| 77 6f 20 73 74 72 69 6e | 67 73 20 69 6e 20 74 68 |wo strin|gs in th|
|00000520| 65 20 66 75 6e 63 74 69 | 6f 6e 20 63 61 6c 6c 3f |e functi|on call?|
|00000530| 0a 3e 09 4e 6f 2c 20 79 | 6f 75 20 63 61 6e 20 75 |.>.No, y|ou can u|
|00000540| 73 65 20 61 6e 79 20 6e | 61 6d 65 20 66 6f 72 20 |se any n|ame for |
|00000550| 74 68 65 20 76 61 72 69 | 61 62 6c 65 73 2e 20 54 |the vari|ables. T|
|00000560| 68 65 20 6f 6e 6c 79 20 | 69 6d 70 6f 72 74 61 6e |he only |importan|
|00000570| 74 0a 09 74 68 69 6e 67 | 20 74 6f 20 72 65 6d 65 |t..thing| to reme|
|00000580| 6d 62 65 72 20 69 73 20 | 74 68 61 74 20 74 68 65 |mber is |that the|
|00000590| 20 70 61 72 61 6d 65 74 | 65 72 73 20 75 73 65 64 | paramet|ers used|
|000005a0| 20 69 6e 20 61 20 66 75 | 6e 63 74 69 6f 6e 20 63 | in a fu|nction c|
|000005b0| 61 6c 6c 0a 09 6d 75 73 | 74 20 62 65 20 74 68 65 |all..mus|t be the|
|000005c0| 20 73 61 6d 65 20 28 6f | 72 20 63 6f 6d 70 61 74 | same (o|r compat|
|000005d0| 69 62 6c 65 20 62 79 20 | 73 74 61 6e 64 61 72 64 |ible by |standard|
|000005e0| 20 63 6f 6e 76 65 72 73 | 69 6f 6e 29 20 20 0a 09 | convers|ion) ..|
|000005f0| 20 0a 3e 20 20 20 20 20 | 20 20 20 20 41 6c 73 6f | .> | Also|
|00000600| 2c 20 75 73 69 6e 67 20 | 65 6d 61 63 73 2c 20 63 |, using |emacs, c|
|00000610| 2b 2b 2c 20 67 2b 2b 2c | 20 64 6f 20 49 20 63 6f |++, g++,| do I co|
|00000620| 6d 70 69 6c 65 20 74 68 | 65 20 63 6c 61 73 73 2c |mpile th|e class,|
|00000630| 20 74 68 65 20 6d 65 6d | 62 65 72 0a 3e 20 20 20 | the mem|ber.> |
|00000640| 20 20 20 20 20 20 66 75 | 6e 63 74 69 6f 6e 20 66 | fu|nction f|
|00000650| 69 6c 65 2c 20 61 6e 64 | 20 74 68 65 20 6d 61 69 |ile, and| the mai|
|00000660| 6e 20 70 72 6f 67 72 61 | 6d 20 73 65 70 65 72 61 |n progra|m sepera|
|00000670| 74 6c 65 79 20 6f 72 20 | 77 69 6c 6c 20 65 6d 61 |tley or |will ema|
|00000680| 63 73 0a 3e 20 20 20 20 | 20 20 20 20 20 64 6f 20 |cs.> | do |
|00000690| 69 74 20 61 6c 6c 20 61 | 74 20 6f 6e 63 65 20 69 |it all a|t once i|
|000006a0| 66 20 63 6f 6d 70 69 6c | 65 20 74 68 65 20 6d 61 |f compil|e the ma|
|000006b0| 69 6e 20 66 75 6e 63 74 | 69 6f 6e 3f 0a 0a 09 44 |in funct|ion?...D|
|000006c0| 6f 20 6e 6f 74 20 66 6f | 72 67 65 74 20 74 68 61 |o not fo|rget tha|
|000006d0| 74 20 65 6d 61 63 73 20 | 69 73 20 6e 6f 74 20 70 |t emacs |is not p|
|000006e0| 61 72 74 20 6f 66 20 74 | 68 65 20 43 2b 2b 20 6c |art of t|he C++ l|
|000006f0| 61 6e 67 75 61 67 65 20 | 62 75 74 20 61 0a 09 6d |anguage |but a..m|
|00000700| 61 63 72 6f 20 65 64 69 | 74 6f 72 20 74 68 61 74 |acro edi|tor that|
|00000710| 20 79 6f 75 20 63 61 6e | 20 63 6f 6e 66 69 67 75 | you can| configu|
|00000720| 72 65 2c 20 79 6f 75 20 | 6e 65 65 64 20 74 6f 20 |re, you |need to |
|00000730| 76 65 72 69 66 79 20 77 | 69 74 68 20 0a 09 79 6f |verify w|ith ..yo|
|00000740| 75 72 20 6f 77 6e 20 73 | 65 74 75 70 20 6f 66 20 |ur own s|etup of |
|00000750| 65 6d 61 63 73 09 09 20 | 0a 3e 20 0a 3e 20 20 20 |emacs.. |.> .> |
|00000760| 20 20 20 20 20 20 41 6c | 73 6f 2c 20 74 68 69 73 | Al|so, this|
|00000770| 20 69 73 20 6d 79 20 66 | 69 72 73 74 20 74 69 6d | is my f|irst tim|
|00000780| 65 20 64 6f 69 6e 67 20 | 63 6c 61 73 73 65 73 2c |e doing |classes,|
|00000790| 20 64 6f 69 6e 67 20 74 | 68 65 6d 20 69 6e 20 73 | doing t|hem in s|
|000007a0| 65 70 65 72 61 74 65 0a | 3e 20 20 20 20 20 20 20 |eperate.|> |
|000007b0| 20 20 66 69 6c 65 73 2c | 20 61 6e 64 20 6c 69 6e | files,| and lin|
|000007c0| 6b 69 6e 67 20 74 68 65 | 6d 2e 20 20 49 27 6d 20 |king the|m. I'm |
|000007d0| 61 6c 73 6f 20 64 6f 69 | 6e 67 20 69 74 20 77 69 |also doi|ng it wi|
|000007e0| 74 68 6f 75 74 20 61 6e | 79 20 65 78 61 6d 70 6c |thout an|y exampl|
|000007f0| 65 73 2e 0a 3e 20 20 20 | 20 20 20 20 20 20 49 20 |es..> | I |
|00000800| 77 72 6f 74 65 20 64 6f | 77 6e 20 74 68 65 20 70 |wrote do|wn the p|
|00000810| 72 65 61 6d 62 6c 65 20 | 74 6f 20 65 61 63 68 20 |reamble |to each |
|00000820| 74 68 72 65 65 20 63 6f | 6d 70 6f 6e 65 6e 74 73 |three co|mponents|
|00000830| 20 62 65 6c 6f 77 2e 20 | 20 43 6f 75 6c 64 0a 3e | below. | Could.>|
|00000840| 20 20 20 20 20 20 20 20 | 20 79 6f 75 20 73 65 65 | | you see|
|00000850| 20 69 66 20 49 20 73 75 | 66 66 69 78 65 64 20 74 | if I su|ffixed t|
|00000860| 68 65 20 66 69 6c 65 73 | 20 61 70 70 72 6f 70 69 |he files| appropi|
|00000870| 61 74 6c 65 79 20 66 6f | 72 20 75 6e 69 78 20 26 |atley fo|r unix &|
|00000880| 20 63 2b 2b 3f 0a 3e 09 | 54 68 65 20 6e 61 6d 69 | c++?.>.|The nami|
|00000890| 6e 67 20 63 6f 6e 76 65 | 6e 74 69 6f 6e 73 20 66 |ng conve|ntions f|
|000008a0| 6f 72 20 66 69 6c 65 73 | 20 61 72 65 20 73 6f 6d |or files| are som|
|000008b0| 65 74 69 6d 65 73 20 64 | 65 70 65 6e 64 61 6e 74 |etimes d|ependant|
|000008c0| 20 6f 66 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 | of the |compiler|
|000008d0| 0a 09 75 73 65 64 2e 20 | 59 6f 75 20 6e 65 65 64 |..used. |You need|
|000008e0| 20 74 6f 20 76 65 72 69 | 66 79 20 74 68 61 74 20 | to veri|fy that |
|000008f0| 77 69 74 68 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |with the| documen|
|00000900| 74 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 63 6f |tation o|f the co|
|00000910| 6d 70 69 6c 65 72 20 74 | 68 61 74 0a 09 79 6f 75 |mpiler t|hat..you|
|00000920| 20 75 73 65 2e 20 53 6f | 6d 65 20 63 6f 6d 70 69 | use. So|me compi|
|00000930| 6c 65 72 20 75 73 65 20 | 74 68 65 20 65 78 74 65 |ler use |the exte|
|00000940| 6e 73 69 6f 6e 20 2e 63 | 63 20 28 53 75 6e 20 63 |nsion .c|c (Sun c|
|00000950| 6f 6d 70 69 6c 65 72 20 | 62 79 20 65 78 61 6d 70 |ompiler |by examp|
|00000960| 6c 65 29 0a 09 6f 74 68 | 65 72 20 75 73 65 20 2e |le)..oth|er use .|
|00000970| 63 70 70 20 28 4c 69 6b | 65 20 74 68 65 20 6f 6e |cpp (Lik|e the on|
|00000980| 65 20 6f 66 20 4d 69 63 | 72 6f 73 6f 66 74 29 2c |e of Mic|rosoft),|
|00000990| 20 2e 2e 2e 0a 09 49 74 | 20 6d 65 61 6e 73 20 76 | .....It| means v|
|000009a0| 65 72 69 66 79 20 77 69 | 74 68 20 79 6f 75 72 20 |erify wi|th your |
|000009b0| 63 6f 6d 70 69 6c 65 72 | 20 64 6f 63 75 6d 65 6e |compiler| documen|
|000009c0| 74 61 74 69 6f 6e 73 20 | 0a 0a 3e 20 20 20 20 20 |tations |..> |
|000009d0| 20 20 20 20 41 6c 73 6f | 20 63 6f 75 6c 64 20 79 | Also| could y|
|000009e0| 6f 75 20 73 65 65 20 69 | 66 20 49 20 22 23 69 6e |ou see i|f I "#in|
|000009f0| 63 6c 75 64 65 64 22 20 | 65 76 65 72 79 74 68 69 |cluded" |everythi|
|00000a00| 6e 67 20 49 20 73 68 6f | 75 6c 64 20 74 6f 20 6d |ng I sho|uld to m|
|00000a10| 61 6b 65 0a 3e 20 20 20 | 20 20 20 20 20 20 73 75 |ake.> | su|
|00000a20| 72 65 20 69 74 20 61 6c | 6c 20 6c 69 6e 6b 73 20 |re it al|l links |
|00000a30| 6f 6b 61 79 3f 20 20 41 | 6c 73 6f 2c 20 49 20 64 |okay? A|lso, I d|
|00000a40| 6f 6e 74 20 72 65 61 6c | 6c 79 20 6b 6e 6f 77 20 |ont real|ly know |
|00000a50| 77 68 61 74 20 74 68 65 | 20 70 75 72 70 6f 73 65 |what the| purpose|
|00000a60| 0a 3e 20 20 20 20 20 20 | 20 20 20 6f 66 20 22 65 |.> | of "e|
|00000a70| 6e 64 69 66 22 20 69 73 | 2c 20 64 69 64 20 49 20 |ndif" is|, did I |
|00000a80| 75 73 65 20 65 6e 6f 75 | 67 68 20 6f 66 20 74 68 |use enou|gh of th|
|00000a90| 65 6d 3f 0a 3e 20 0a 3e | 20 20 20 20 20 20 20 20 |em?.> .>| |
|00000aa0| 20 54 68 61 6e 6b 73 20 | 49 20 6f 77 65 20 79 6f | Thanks |I owe yo|
|00000ab0| 75 20 61 20 62 69 67 20 | 6f 6e 65 0a 3e 20 0a 3e |u a big |one.> .>|
|00000ac0| 20 20 20 20 20 20 20 20 | 20 53 74 65 76 65 0a 3e | | Steve.>|
|00000ad0| 20 20 20 20 20 20 20 20 | 20 73 72 75 73 73 65 6c | | srussel|
|00000ae0| 6c 40 6e 6f 76 61 2e 75 | 6d 75 63 2e 65 64 75 0a |l@nova.u|muc.edu.|
|00000af0| 3e 20 0a 3e 20 31 2e 20 | 63 6c 61 73 73 20 68 65 |> .> 1. |class he|
|00000b00| 61 64 65 72 20 66 69 6c | 65 20 6e 61 6d 65 28 20 |ader fil|e name( |
|00000b10| 63 6f 6e 74 61 69 6e 73 | 20 64 65 63 61 6c 72 61 |contains| decalra|
|00000b20| 74 69 6f 6e 73 20 61 6e | 64 20 6d 65 6d 62 65 72 |tions an|d member|
|00000b30| 20 70 72 6f 74 6f 74 79 | 70 65 73 29 3a 0a 3e 20 | prototy|pes):.> |
|00000b40| 20 20 20 20 45 6d 70 52 | 65 63 6f 72 64 73 2e 68 | EmpR|ecords.h|
|00000b50| 0a 3e 20 0a 3e 20 20 20 | 20 20 20 20 20 20 2f 2f |.> .> | //|
|00000b60| 46 49 4c 45 3a 20 45 6d | 70 52 65 63 6f 72 64 73 |FILE: Em|pRecords|
|00000b70| 2e 68 0a 3e 20 20 20 20 | 20 20 20 20 20 2f 2f 20 |.h.> | // |
|00000b80| 53 54 4f 52 45 53 20 41 | 4e 44 20 4d 41 4e 49 50 |STORES A|ND MANIP|
|00000b90| 55 4c 41 54 45 53 20 46 | 49 4c 45 53 20 4f 46 20 |ULATES F|ILES OF |
|00000ba0| 45 4d 50 4c 4f 59 45 45 | 20 52 45 43 4f 52 44 53 |EMPLOYEE| RECORDS|
|00000bb0| 0a 3e 20 0a 3e 20 20 20 | 20 20 20 20 20 20 23 69 |.> .> | #i|
|00000bc0| 66 6e 64 65 66 20 45 4d | 50 4c 4f 59 45 45 52 45 |fndef EM|PLOYEERE|
|00000bd0| 43 4f 52 44 53 5f 48 5f | 0a 3e 20 20 20 20 20 20 |CORDS_H_|.> |
|00000be0| 20 20 20 23 64 65 66 69 | 6e 65 20 45 4d 50 4c 4f | #defi|ne EMPLO|
|00000bf0| 59 45 45 52 45 43 4f 52 | 44 53 5f 48 5f 0a 3e 20 |YEERECOR|DS_H_.> |
|00000c00| 0a 3e 20 20 20 20 20 20 | 20 20 20 23 69 6e 63 6c |.> | #incl|
|00000c10| 75 64 65 20 3c 45 6d 70 | 52 65 63 6f 72 64 73 2e |ude <Emp|Records.|
|00000c20| 63 63 3e 09 54 68 69 73 | 20 6c 69 6e 65 20 4d 55 |cc>.This| line MU|
|00000c30| 53 54 20 62 65 20 72 65 | 6d 6f 76 65 64 0a 09 49 |ST be re|moved..I|
|00000c40| 74 73 20 6e 6f 74 20 63 | 6f 72 72 65 63 74 2c 20 |ts not c|orrect, |
|00000c50| 79 6f 75 20 6e 65 76 65 | 72 20 69 6e 63 6c 75 64 |you neve|r includ|
|00000c60| 65 64 20 43 2f 43 2b 2b | 20 63 6f 64 65 20 69 6e |ed C/C++| code in|
|00000c70| 20 69 6e 63 6c 75 64 65 | 20 66 69 6c 65 2e 0a 20 | include| file.. |
|00000c80| 0a 3e 20 20 20 20 20 20 | 20 20 20 23 69 6e 63 6c |.> | #incl|
|00000c90| 75 64 65 20 3c 66 73 74 | 72 65 61 6d 2e 68 3e 0a |ude <fst|ream.h>.|
|00000ca0| 3e 20 20 20 20 20 20 20 | 20 20 23 69 6e 63 6c 75 |> | #inclu|
|00000cb0| 64 65 20 3c 69 6f 6d 61 | 6e 69 70 2e 68 3e 0a 3e |de <ioma|nip.h>.>|
|00000cc0| 20 20 20 20 20 20 20 20 | 20 23 69 6e 63 6c 75 64 | | #includ|
|00000cd0| 65 20 3c 69 6f 73 74 72 | 65 61 6d 2e 68 3e 0a 3e |e <iostr|eam.h>.>|
|00000ce0| 20 20 20 20 20 20 20 20 | 20 23 69 6e 63 6c 75 64 | | #includ|
|00000cf0| 65 20 3c 73 74 64 6c 69 | 62 2e 68 3e 0a 3e 20 0a |e <stdli|b.h>.> .|
|00000d00| 3e 20 20 20 20 20 20 20 | 20 20 28 20 74 68 65 20 |> | ( the |
|00000d10| 63 6c 61 73 73 2c 20 64 | 65 63 6c 61 72 61 74 69 |class, d|eclarati|
|00000d20| 6f 6e 73 20 61 6e 64 20 | 70 72 6f 74 6f 74 79 70 |ons and |prototyp|
|00000d30| 65 73 20 29 0a 3e 20 0a | 3e 20 20 20 20 20 20 20 |es ).> .|> |
|00000d40| 20 20 23 65 6e 64 69 66 | 0a 3e 20 0a 3e 20 0a 3e | #endif|.> .> .>|
|00000d50| 20 32 2e 20 66 69 6c 65 | 20 66 6f 72 20 74 68 65 | 2. file| for the|
|00000d60| 20 63 6c 61 73 73 20 6d | 65 6d 62 65 72 20 66 75 | class m|ember fu|
|00000d70| 6e 63 74 69 6f 6e 73 3a | 20 45 6d 70 52 65 63 6f |nctions:| EmpReco|
|00000d80| 72 64 73 2e 63 63 3a 0a | 3e 20 0a 3e 20 20 20 20 |rds.cc:.|> .> |
|00000d90| 20 20 20 20 20 2f 2f 46 | 49 4c 45 3a 20 45 6d 70 | //F|ILE: Emp|
|00000da0| 52 65 63 6f 72 64 73 2e | 63 63 0a 3e 20 20 20 20 |Records.|cc.> |
|00000db0| 20 20 20 20 20 2f 2f 4d | 45 4d 42 45 52 20 46 55 | //M|EMBER FU|
|00000dc0| 4e 43 54 49 4f 4e 53 20 | 46 4f 52 20 43 4c 41 53 |NCTIONS |FOR CLAS|
|00000dd0| 53 20 45 4d 50 4c 4f 59 | 45 45 5f 52 45 43 4f 52 |S EMPLOY|EE_RECOR|
|00000de0| 44 53 2e 48 0a 3e 54 68 | 65 20 6e 65 78 74 20 32 |DS.H.>Th|e next 2|
|00000df0| 20 6c 69 6e 65 73 20 61 | 72 65 20 6e 6f 74 20 75 | lines a|re not u|
|00000e00| 73 65 66 75 6c 20 61 6e | 64 20 64 6f 6e 27 74 20 |seful an|d don't |
|00000e10| 6e 65 65 64 20 74 6f 20 | 62 65 20 75 73 65 64 20 |need to |be used |
|00000e20| 0a 3e 20 20 20 20 20 20 | 20 20 20 23 69 66 6e 64 |.> | #ifnd|
|00000e30| 65 66 20 45 4d 50 4c 4f | 59 45 45 52 45 43 4f 52 |ef EMPLO|YEERECOR|
|00000e40| 44 53 5f 43 43 5f 0a 3e | 20 20 20 20 20 20 20 20 |DS_CC_.>| |
|00000e50| 20 23 64 65 66 69 6e 65 | 20 45 4d 50 4c 4f 59 45 | #define| EMPLOYE|
|00000e60| 45 52 45 43 4f 52 44 53 | 5f 43 43 5f 0a 3e 20 0a |ERECORDS|_CC_.> .|
|00000e70| 0a 3e 20 20 20 20 20 20 | 20 20 20 23 69 6e 63 6c |.> | #incl|
|00000e80| 75 64 65 20 3c 45 6d 70 | 52 65 63 6f 72 64 73 2e |ude <Emp|Records.|
|00000e90| 68 3e 0a 0a 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |h>..The |followin|
|00000ea0| 67 73 20 69 6e 63 6c 75 | 64 65 27 73 20 6e 6f 74 |gs inclu|de's not|
|00000eb0| 20 6e 65 65 64 20 74 6f | 20 62 65 20 69 6e 63 6c | need to| be incl|
|00000ec0| 75 64 65 64 20 62 65 63 | 61 75 73 65 0a 74 68 65 |uded bec|ause.the|
|00000ed0| 20 61 72 65 20 61 6c 72 | 65 61 64 79 20 69 6e 63 | are alr|eady inc|
|00000ee0| 6c 75 64 65 64 20 69 6e | 20 74 68 65 20 45 6d 70 |luded in| the Emp|
|00000ef0| 52 65 63 6f 72 64 73 2e | 68 20 66 69 6c 65 20 74 |Records.|h file t|
|00000f00| 68 61 74 20 69 73 0a 69 | 6e 63 6c 75 64 65 20 70 |hat is.i|nclude p|
|00000f10| 72 65 76 69 6f 75 73 6c | 79 2e 0a 0a 3e 20 20 20 |reviousl|y...> |
|00000f20| 20 20 20 20 20 20 23 69 | 6e 63 6c 75 64 65 20 3c | #i|nclude <|
|00000f30| 66 73 74 72 65 61 6d 2e | 68 3e 0a 3e 20 20 20 20 |fstream.|h>.> |
|00000f40| 20 20 20 20 20 23 69 6e | 63 6c 75 64 65 20 3c 69 | #in|clude <i|
|00000f50| 6f 6d 61 6e 69 70 2e 68 | 3e 0a 3e 20 20 20 20 20 |omanip.h|>.> |
|00000f60| 20 20 20 20 23 69 6e 63 | 6c 75 64 65 20 3c 69 6f | #inc|lude <io|
|00000f70| 73 74 72 65 61 6d 2e 68 | 3e 0a 3e 20 20 20 20 20 |stream.h|>.> |
|00000f80| 20 20 20 20 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 | #inc|lude <st|
|00000f90| 64 6c 69 62 2e 68 3e 0a | 0a 3e 20 0a 3e 20 20 20 |dlib.h>.|.> .> |
|00000fa0| 20 20 20 20 20 20 28 20 | 6d 65 6d 62 65 72 20 66 | ( |member f|
|00000fb0| 75 6e 63 74 69 6f 6e 20 | 64 65 66 69 6e 69 74 69 |unction |definiti|
|00000fc0| 6f 6e 73 20 29 0a 3e 49 | 74 27 73 20 6e 6f 74 20 |ons ).>I|t's not |
|00000fd0| 72 65 71 75 69 72 65 64 | 2c 20 62 65 63 61 75 73 |required|, becaus|
|00000fe0| 65 20 74 68 65 20 23 69 | 66 6e 64 65 66 20 69 73 |e the #i|fndef is|
|00000ff0| 20 72 65 6d 6f 76 65 64 | 20 0a 3e 20 20 20 20 20 | removed| .> |
|00001000| 20 20 20 20 23 65 6e 64 | 69 66 0a 3e 20 0a 3e 20 | #end|if.> .> |
|00001010| 33 2e 20 6d 61 69 6e 20 | 70 72 6f 67 72 61 6d 20 |3. main |program |
|00001020| 74 68 61 74 20 75 73 65 | 73 20 63 6c 61 73 73 20 |that use|s class |
|00001030| 65 6d 70 6c 6f 79 65 65 | 5f 72 65 63 6f 72 64 73 |employee|_records|
|00001040| 3a 20 70 72 6f 6a 65 63 | 74 32 0a 3e 20 0a 3e 20 |: projec|t2.> .> |
|00001050| 20 20 20 20 20 20 20 20 | 2f 2f 20 46 49 4c 45 3a | |// FILE:|
|00001060| 20 32 34 30 5f 32 2e 43 | 0a 3e 20 20 20 20 20 20 | 240_2.C|.> |
|00001070| 20 20 20 2f 2f 20 4d 41 | 49 4e 49 50 55 4c 41 54 | // MA|INIPULAT|
|00001080| 45 53 20 45 4d 50 4c 4f | 59 45 45 20 52 45 43 4f |ES EMPLO|YEE RECO|
|00001090| 52 44 53 20 56 49 41 20 | 41 20 43 4c 41 53 53 0a |RDS VIA |A CLASS.|
|000010a0| 3e 20 0a 3e 20 20 20 20 | 20 20 20 20 20 23 69 6e |> .> | #in|
|000010b0| 63 6c 75 64 65 20 3c 45 | 6d 70 52 65 63 6f 72 64 |clude <E|mpRecord|
|000010c0| 73 2e 68 3e 0a 0a 09 53 | 65 65 20 70 72 65 76 69 |s.h>...S|ee previ|
|000010d0| 6f 75 73 20 63 6f 6d 6d | 65 6e 74 0a 0a 3e 20 20 |ous comm|ent..> |
|000010e0| 20 20 20 20 20 20 20 23 | 69 6e 63 6c 75 64 65 20 | #|include |
|000010f0| 3c 66 73 74 72 65 61 6d | 2e 68 3e 0a 3e 20 20 20 |<fstream|.h>.> |
|00001100| 20 20 20 20 20 20 23 69 | 6e 63 6c 75 64 65 20 3c | #i|nclude <|
|00001110| 69 6f 6d 61 6e 69 70 2e | 68 3e 0a 3e 20 20 20 20 |iomanip.|h>.> |
|00001120| 20 20 20 20 20 23 69 6e | 63 6c 75 64 65 20 3c 69 | #in|clude <i|
|00001130| 6f 73 74 72 65 61 6d 2e | 68 3e 0a 3e 20 20 20 20 |ostream.|h>.> |
|00001140| 20 20 20 20 20 23 69 6e | 63 6c 75 64 65 20 3c 73 | #in|clude <s|
|00001150| 74 64 6c 69 62 2e 68 3e | 0a 0a 49 20 74 68 69 6e |tdlib.h>|..I thin|
|00001160| 67 20 69 74 20 69 73 20 | 67 6f 6f 64 2c 20 69 66 |g it is |good, if|
|00001170| 20 79 6f 75 20 63 61 6e | 20 72 65 61 64 20 61 20 | you can| read a |
|00001180| 62 6f 6f 6b 20 6f 6e 20 | 43 2f 43 2b 2b 20 74 68 |book on |C/C++ th|
|00001190| 61 74 20 67 61 76 65 20 | 74 68 65 20 6d 61 6a 6f |at gave |the majo|
|000011a0| 72 20 69 64 65 61 2e 0a | 0a 54 68 65 20 43 2f 43 |r idea..|.The C/C|
|000011b0| 2b 2b 20 63 6f 6d 70 69 | 6c 65 72 20 68 61 73 20 |++ compi|ler has |
|000011c0| 61 20 70 72 65 70 72 6f | 63 65 73 73 6f 72 20 63 |a prepro|cessor c|
|000011d0| 6f 6d 70 6f 6e 65 6e 74 | 20 74 68 61 74 20 72 65 |omponent| that re|
|000011e0| 61 64 20 74 68 65 20 63 | 6f 6d 70 69 6c 65 20 66 |ad the c|ompile f|
|000011f0| 69 6c 65 0a 6c 69 6e 65 | 20 62 79 20 6c 69 6e 65 |ile.line| by line|
|00001200| 20 61 6e 64 20 6f 75 74 | 70 75 74 20 65 61 63 68 | and out|put each|
|00001210| 20 6c 69 6e 65 20 69 6e | 20 61 20 74 65 6d 70 6f | line in| a tempo|
|00001220| 72 61 72 79 20 66 69 6c | 65 2e 20 41 6c 73 6f 20 |rary fil|e. Also |
|00001230| 74 68 65 20 70 72 65 70 | 72 6f 63 65 73 73 6f 72 |the prep|rocessor|
|00001240| 20 0a 64 69 72 65 63 74 | 69 76 65 20 28 54 68 65 | .direct|ive (The|
|00001250| 20 63 6f 6d 6d 61 6e 64 | 20 73 74 61 72 74 69 6e | command| startin|
|00001260| 67 20 77 69 74 68 20 23 | 20 29 20 61 72 65 20 65 |g with #| ) are e|
|00001270| 78 65 63 75 74 65 64 0a | 57 68 65 6e 20 74 68 65 |xecuted.|When the|
|00001280| 20 70 72 65 70 72 6f 63 | 65 73 73 6f 72 20 68 61 | preproc|essor ha|
|00001290| 64 20 66 69 6e 69 73 68 | 20 74 6f 20 72 65 61 64 |d finish| to read|
|000012a0| 20 74 68 65 20 66 69 6c | 65 2c 20 74 68 65 20 74 | the fil|e, the t|
|000012b0| 65 6d 70 6f 72 61 72 79 | 20 66 69 6c 65 20 69 73 |emporary| file is|
|000012c0| 20 70 61 73 73 65 64 20 | 0a 74 6f 20 74 68 65 20 | passed |.to the |
|000012d0| 63 6f 6d 70 69 6c 65 72 | 2e 0a 0a 54 68 65 20 69 |compiler|...The i|
|000012e0| 6e 63 6c 75 64 65 20 64 | 69 72 65 63 74 69 76 65 |nclude d|irective|
|000012f0| 20 73 61 79 20 74 6f 20 | 73 74 61 72 74 20 74 6f | say to |start to|
|00001300| 20 72 65 61 64 20 74 68 | 65 20 6e 65 78 74 20 6c | read th|e next l|
|00001310| 69 6e 65 20 69 6e 20 74 | 68 65 20 66 69 6c 65 20 |ine in t|he file |
|00001320| 72 65 66 65 72 65 6e 63 | 65 64 0a 62 79 20 74 68 |referenc|ed.by th|
|00001330| 65 20 69 6e 63 6c 75 64 | 65 20 64 69 72 65 63 74 |e includ|e direct|
|00001340| 69 76 65 20 61 6e 64 20 | 77 68 65 6e 20 74 68 65 |ive and |when the|
|00001350| 20 70 72 65 70 72 6f 63 | 65 73 73 6f 72 20 68 61 | preproc|essor ha|
|00001360| 76 65 20 66 69 6e 69 73 | 68 20 69 73 20 77 6f 72 |ve finis|h is wor|
|00001370| 6b 20 77 69 74 68 20 0a | 74 68 69 73 20 66 69 6c |k with .|this fil|
|00001380| 65 2c 20 74 68 65 20 70 | 72 65 70 72 6f 63 65 73 |e, the p|reproces|
|00001390| 73 6f 72 20 63 6f 6d 65 | 20 62 61 63 6b 20 74 6f |sor come| back to|
|000013a0| 20 6e 65 78 74 20 6c 69 | 6e 65 20 6f 66 20 74 68 | next li|ne of th|
|000013b0| 65 20 70 72 65 76 69 6f | 75 73 20 66 69 6c 65 2e |e previo|us file.|
|000013c0| 0a 54 68 69 73 20 6d 65 | 63 68 61 6e 69 73 6d 20 |.This me|chanism |
|000013d0| 63 61 6e 20 62 65 20 72 | 65 63 75 72 73 69 76 65 |can be r|ecursive|
|000013e0| 2e 0a 0a 42 65 63 61 75 | 73 65 20 74 68 65 20 70 |...Becau|se the p|
|000013f0| 72 65 70 72 6f 63 65 73 | 73 6f 72 20 6f 6e 6c 79 |reproces|sor only|
|00001400| 20 70 72 6f 63 65 73 73 | 20 66 69 6c 65 73 20 6c | process| files l|
|00001410| 69 6e 65 20 62 79 20 6c | 69 6e 65 20 0a 74 68 65 |ine by l|ine .the|
|00001420| 20 0a 23 69 66 6e 64 65 | 66 20 0a 23 64 65 66 69 | .#ifnde|f .#defi|
|00001430| 6e 65 0a 2e 2e 2e 0a 23 | 65 6e 64 69 66 0a 0a 6c |ne.....#|endif..l|
|00001440| 61 6e 67 75 61 67 65 20 | 73 74 72 75 63 74 75 72 |anguage |structur|
|00001450| 65 20 69 73 20 75 73 65 | 64 20 74 6f 20 61 76 6f |e is use|d to avo|
|00001460| 69 64 20 64 6f 75 62 6c | 65 20 69 6e 63 6c 75 73 |id doubl|e inclus|
|00001470| 69 6f 6e 2c 20 49 74 27 | 73 20 6d 65 61 6e 73 0a |ion, It'|s means.|
|00001480| 64 6f 20 6e 6f 74 20 69 | 6e 63 6c 75 64 65 20 32 |do not i|nclude 2|
|00001490| 20 74 69 6d 65 73 20 74 | 68 65 20 73 61 6d 65 20 | times t|he same |
|000014a0| 66 69 6c 65 73 2e 0a 0a | 49 66 20 79 6f 75 20 68 |files...|If you h|
|000014b0| 61 76 65 20 6d 6f 72 65 | 20 71 75 65 73 74 69 6f |ave more| questio|
|000014c0| 6e 73 20 79 6f 75 20 63 | 61 6e 20 73 65 6e 64 20 |ns you c|an send |
|000014d0| 6d 65 20 61 20 65 6d 61 | 69 6c 0a 0a 09 46 72 61 |me a ema|il...Fra|
|000014e0| 6e 63 6f 69 73 20 44 6f | 6e 61 74 6f 20 28 64 6f |ncois Do|nato (do|
|000014f0| 6e 61 74 6f 66 72 40 64 | 6d 72 2e 63 61 20 6f 72 |natofr@d|mr.ca or|
|00001500| 20 6c 6d 63 66 72 64 6f | 40 6c 6d 63 2e 65 72 69 | lmcfrdo|@lmc.eri|
|00001510| 63 73 73 6f 6e 2e 73 65 | 29 0a 0a 09 50 2e 53 2e |csson.se|)...P.S.|
|00001520| 20 45 78 63 75 73 65 20 | 6d 79 20 65 6e 67 6c 69 | Excuse |my engli|
|00001530| 73 68 2c 20 6d 79 20 6d | 6f 74 68 65 72 20 74 6f |sh, my m|other to|
|00001540| 6e 67 75 65 20 69 73 20 | 66 72 65 6e 63 68 0a |ngue is |french. |
+--------+-------------------------+-------------------------+--------+--------+